import 'package:flutter_chat/common/store/stores.dart';
import 'package:flutter_chat/common/utils/utils.dart';
import 'package:flutter_chat/common/widget/widgets.dart';
import 'package:get/get.dart';

import 'state.dart';

class SettingLogic extends CustomGetxController {
  final SettingState state = SettingState();

  /// 退出登录
  void onLogout() {
    DialogUtil.showWarningDialog(
      content: "您确定要退出登录吗？",
      onConfirm: () {
        Get.back();
        UserStore.to.logout();
        ToastUtil.successNotification(subTitle: "退出登录成功");
      },
    );
  }
}
